/*
 *    Copyright (c) 2018-2025, bfcloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: bfcloud
 */

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/ceping/cepinghdglhdcphzb/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/ceping/cepinghdglhdcphzb',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/ceping/cepinghdglhdcphzb/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/ceping/cepinghdglhdcphzb/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/ceping/cepinghdglhdcphzb',
    method: 'put',
    data: obj
  })
}

/**
 * 会议测评汇总查询
 * @param hdid 会议ID
 * @param cppid 测评ID
 * @returns {*}
 */
export function hzInfo(hdid, cppid) {
  return request({
    url: '/ceping/cepinghdglhdcphzb/hzInfo/' + hdid + '/' + cppid,
    method: 'get'
  })
}

/**
 * 衩测评人会议测评汇总查询
 * @param hdid 会议ID
 * @param cppid 测评ID
 * @param bcpid 被测ID
 * @param type 类型1个人2部门
 * @returns {*}
 */
export function bcpHzInfo(hdid, cppid, bcpid, type) {
  return request({
    url: '/ceping/cepinghdglhdcphzb/ccpDxHzMxInfo/' + hdid + '/' + cppid + '/' + bcpid + '/' + type,
    method: 'get'
  })
}

/**
 * 衩测评人会议测评会议查询
 * @param hdid 会议ID
 * @param bcpid 被测ID
 * @param type 类型1个人2部门
 * @returns {*}
 */
export function bcpHdInfo(hdid, bcpid, type) {
  return request({
    url: '/ceping/cepinghdglhdcphzb/ccpDxHdMxInfo/' + hdid + '/' + bcpid + '/' + type,
    method: 'get'
  })
}


/**
 * 衩测评人会议测评统计查询
 * @param tjid 会议ID
 * @param bcpid 被测ID
 * @param type 类型1个人2部门
 * @returns {*}
 */
export function bcpTjInfo(tjid, bcpid, type) {
  return request({
    url: '/ceping/cepinghdglhdcphzb/ccpDxTjMxInfo/' + tjid + '/' + bcpid + '/' + type,
    method: 'get'
  })
}
